home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
pcl
/
src-16f.lha
/
tools
/
fixheader
< prev
next >
Wrap
Text File
|
1992-02-03
|
1KB
|
40 lines
#!/bin/csh -f
#
# $Header: fixheader,v 1.2 92/02/03 01:46:58 ram Exp $
set quotehack = \$"Header: "\$
foreach file ($argv)
set range = (`fgrep -n ';;; ***********' $file | sed -e '3,$d' -e 's/:.*//'`)
if ($#range < 2) then
echo '**********' $file'': Could not find the header comment.
goto nextfile
endif
if ($range[2] > 12) then
echo '**********' $file'': Large header comment, you deal with it.
goto nextfile
endif
echo fixing $file
ed $file <<END_OF_ED_STUFF
$range[1],$range[2]d
$range[1]i
;;; **********************************************************************
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of CMU Common Lisp, please contact
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$quotehack")
;;;
;;; **********************************************************************
.
w
q
END_OF_ED_STUFF
nextfile:
end